<h2><?php echo $this->user->username ?></h2>
<div id = "userLeft">
    <div id = "userAccount">
        <div id = "userAvatar">
        <?php
        if ($this->user->avatar){
            echo "<img src = '/uploads/".$this->user->avatar."'>";
        }
        else{
            echo "<img src = '/skins/default/images/noavatar.gif'>";
        }
            
        ?>
        </div>
        <div id = "userInfo">
        <?php
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            if($auth->getIdentity()->role != 'guest'){
                if($auth->getIdentity()->id == $this->user->id){ ?>
                    <a href="/user/update/id/<?php echo $this->user->id; ?>">更改个人资料</a> | <a href="/user/change-password/id/<?php echo $this->user->id;?>">更改密码</a><br /> | <a href="/user/reset-password">重置密码</a><br />
            <?php
             }
                echo "邮箱：".$this->user->email."<br />";
            }
            // 作者
            
        }
        echo "注册日期：".date('Y年m月d日',$this->user->time_reg)."<br />";
        echo "上次登录：".date('Y年m月d日',$this->user->time_last)."<br />";
        ?>
        </div>
        <div id = "userProfile"><?php echo $this->user->profile; ?></div>
    </div>
    <div id = "userForumTopic">
        <h3><?php echo $this->user->username ?>的论坛主题</h3>
        <?php foreach ($this->topics as $topic){
            echo "<a href='/community/topic/id/".$topic['id']."' target='blank'>".$topic['subject']."</a><br />";
        }
         ?>
     </div>
</div>
<!--用户信息结束-->
<div id = "userRight">
    <h2><?php echo $this->user->username ?>的博客文章</h2>
    <?php
    if ($this->blogs){
        foreach($this->blogs as $blog){
            echo "<h3><a href='/blog/view/id/".$blog->id."' target='blank'>".$blog->title."</a></h3>";
            echo $blog['body'];
        }
    }
    ?>
</div>
<div style = "clear:both;"></div>



